<?php

/**
 * Author: Hancock
 * Email: flang6157@gmail.com
 * Date: 4/26/2017
 * Des: 短信类
 */
class sms
{
    private $type;//0:阿里大于;

    public function __construct($type)
    {
        $this->type = $type;
    }

    public function send($mobile, $data, $code)
    {
        switch ($this->type) {
            case 0:
                return $this->aliSend($mobile, $data, $code);
            default:
                return $this->aliSend($mobile, $data, $code);
        }
    }

    public function aliSend($mobile, $data, $code)
    {
        include_once FRAMEWORK_PATH.'plugins'.SEPARATE . 'sms/aliSms.class.php';
        $sms = new aliSms;
        return $sms->sendSms($mobile, $data, $code);
    }
}